﻿$(document).ready(function(){



/*- b-core-ui-select__select -*/
    $('.b-core-ui-select__select').coreUISelect();



	//------------------slader-mini-----------------//	
	 /*- goods-tabs__slider -*/
	 $(".goods-tabs__slider-brand").sliderkit({
	  autospeed:999000,
	  shownavitems:5,
	  scroll:1,
	  mousewheel:false,
	  circular:true,
	  /* start:2 */
	 });
 
 
	$("a[rel=pop_up]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over'
	});


	/*- promo-slider -*/
	$(".promo-slider").sliderkit({
		shownavitems:10,
		circular:true,
		navitemshover:false,
		panelfxspeed:400,
		auto:true,
		autostill:true,
	});

	/*- product-info__tabs -*/
	$(function(){
		$('.product-info__tabs__title').click(function(){
			$(this)
				.siblings().removeClass('selected').end()
				.next('.product-info__tabs__content').andSelf().addClass('selected');

			if( $(this).html() == 'Описание' )
			{
				$('.product-info__columns__right').hide();
				$('.product-info__tabs').css('width','100%');
			}
			else
			{
				$('.product-info__columns__right').show();
				$('.product-info__tabs').css('width','645px');
			}
		});
	});

	/*- goods-tabs -*/
	$(function(){
		$('.goods-tabs__title').click(function(){
			$(this)
				.siblings().removeClass('selected').end()
				.next('.goods-tabs__content').andSelf().addClass('selected');
		});
	});

	/*- goods-tabs__slider -*/
	$(".goods-tabs__slider.four-goods").sliderkit({
		autospeed:7000,
		shownavitems:4,
		scroll:1,
		mousewheel:false,
		circular:true,
		/* start:2 */
	});

	/*- goods-tabs__slider -*/
	$(".goods-tabs__slider.three-goods").sliderkit({
		autospeed:7000,
		shownavitems:4,
		scroll:1,
		mousewheel:false,
		circular:true,
		/* start:2 */
	});

	/*- slider-goods -*/
	$(".slider-goods").sliderkit({
		shownavitems:4,
		circular:true,
		navitemshover:false,
		panelfxspeed:400,
		auto:true,
		autostill:true,
	});






	/*- footer__slider .sliderkit -*/
	$(".footer__slider .sliderkit").sliderkit({
		autospeed:7000,
		shownavitems:10,
		scroll:1,
		mousewheel:false,
		circular:true,
		start:2
	});

	/*- footer-slider -*/
	$("#footer-slider").sliderkit({
		autospeed:8000,
		shownavitems:10,
		scroll:1,
		mousewheel:false,
		circular:true,
		start:2
	});

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	/*- popup -*/
	var popupParams, popupSelect, docHeight, citySelect, mapCanvas, mapLatlng, markerTitle, infoWindowContent, popupTitle, gmapCords, radioSelected;

	$('.show-popup').click(function(){
		popupParams = $(this).attr('href');
		popupSelect = $(popupParams);
		getPopup('show', this);
		return false;
	});

	$('.global-popup__close, .global-popup__popup-overlay').click(function(){
		getPopup('hide', this);
		return false;
	});

	function getPopup(action, el){
		if(action == 'show') {
			popupSelect.fadeIn(100);
		} else {
			popupSelect.fadeOut(100);
		}
	}

	/*- reestablish -*/
	$('.reestablish').click(function () {
		$("#authorization").fadeOut(100);
		$(this).addClass('concealment');
	});

	// To top plugin
	$('#toTop').UItoTop({ scrollSpeed: 200 });
	
	
	
});
